Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(explore): let admin overwrite slice #16290

Merged
merged 1 commit into from
Aug 17, 2021

Conversation

villebro
Copy link
Member

SUMMARY

Currently Explore doesn't let Admins overwrite a slice if they don't belong to the owners group. This changes this so that admins have the can_overwrite property on bootstrap data set to True if the user is an owner OR they are an Admin. In addition, the Edit Chart metadata modal is changed so that it is possible to save even if the owner list is empty. This is to align the behavior of the Chart metadata modal with the Dashboard metadata modal. See #15149 for more context on this change.

AFTER

As an admin, the user can now overwrite the chart if they are an Admin:
image
In addition, the Chart metadata modal is now saveable even if the owners list is empty:
image

BEFORE

Currently the overwrite option is disabled for admins that aren't set as owners of a chart:
image
In addition, the Save button in the Chart metadata modal is disabled when empty:
image

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Aug 17, 2021

Codecov Report

Merging #16290 (08d40e2) into master (3709131) will decrease coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16290      +/-   ##
==========================================
- Coverage   76.70%   76.64%   -0.07%     
==========================================
  Files         997      997              
  Lines       53240    53246       +6     
  Branches     6774     6777       +3     
==========================================
- Hits        40838    40808      -30     
- Misses      12172    12208      +36     
  Partials      230      230              
Flag Coverage Δ
hive 81.35% <100.00%> (+0.03%) ⬆️
javascript 70.94% <100.00%> (-0.02%) ⬇️
mysql 81.56% <100.00%> (+0.03%) ⬆️
postgres 81.62% <100.00%> (+0.03%) ⬆️
presto ?
python 81.99% <100.00%> (-0.12%) ⬇️
sqlite 81.27% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...d/src/explore/components/PropertiesModal/index.tsx 81.94% <100.00%> (ø)
superset/views/core.py 75.25% <100.00%> (ø)
superset/db_engine_specs/presto.py 84.51% <0.00%> (-5.86%) ⬇️
superset/connectors/sqla/models.py 88.28% <0.00%> (-1.43%) ⬇️
...et-frontend/src/components/TableView/TableView.tsx 94.44% <0.00%> (-1.34%) ⬇️
...rset-frontend/src/components/ReportModal/index.tsx 73.40% <0.00%> (-1.07%) ⬇️
superset/utils/pandas_postprocessing.py 84.09% <0.00%> (-0.71%) ⬇️
superset/charts/post_processing.py 76.47% <0.00%> (-0.55%) ⬇️
superset/models/core.py 89.14% <0.00%> (-0.26%) ⬇️
...frontend/src/views/CRUD/alert/AlertReportModal.tsx 62.64% <0.00%> (-0.24%) ⬇️
... and 30 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3709131...08d40e2. Read the comment docs.

Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks for a quick fix.

@villebro villebro merged commit d13b081 into apache:master Aug 17, 2021
@villebro villebro deleted the villebro/slice-overwrite branch August 17, 2021 07:55
@henryyeh
Copy link
Contributor

🏷️ 2021.31

henryyeh pushed a commit to preset-io/superset that referenced this pull request Aug 19, 2021
rusackas added a commit that referenced this pull request Aug 23, 2021
rusackas added a commit that referenced this pull request Aug 24, 2021
henryyeh pushed a commit to preset-io/superset that referenced this pull request Aug 24, 2021
amitmiran137 pushed a commit to nielsen-oss/superset that referenced this pull request Aug 26, 2021
* upstream/master: (25 commits)
  chore(ci): bump pylint to 2.10.2 (apache#16463)
  fix: prevent page crash when chart can't render (apache#16464)
  chore: fixed slack invite link (apache#16466)
  fix(native-filters): handle null values in value filter (apache#16460)
  feat: add function list to auto-complete to Clickhouse datasource (apache#16234)
  refactor(explore): improve typing for Dnd controls (apache#16362)
  fix(explore): update overwrite button on perm change (apache#16437)
  feat: Draggable and Resizable Modal (apache#16394)
  refactor: sql_json view endpoint (apache#16441)
  fix(dashboard): undo and redo buttons weird alignment  (apache#16417)
  fix: setupPlugin in chart list page (apache#16413)
  fix: Disable Slack notification method if no api token (apache#16367)
  feat: add Shillelagh DB engine spec (apache#16416)
  fix: copy to Clipboard order (apache#16299)
  docs: make FEATURE_FLAGS.md reference a link (apache#16415)
  chore(viz): bump superset-ui to 0.17.87 (apache#16420)
  feat: add activate command (apache#16404)
  Revert "fix(explore): let admin overwrite slice (apache#16290)" (apache#16408)
  fix(explore): retain chart ownership on query context update (apache#16419)
  chore: Removes the TODOs and uses the default page size (apache#16422)
  ...
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels preset:2021.31 preset-io size/XS 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants